package im.vinci.server.device.domain;

import com.google.common.base.MoreObjects;

import java.io.Serializable;
import java.util.Date;

/**
 * Created by henryhome on 11/12/15.
 */
public class Device implements Serializable{

    private Integer id;
    private String sn;
    private String mac;
    private String imei;
    private String iotDeviceId;
    private String iotDeviceSecret;

    private Date dtCreate;
    private Date dtUpdate;

    public Integer getId() {
        return id;
    }

    public Device setId(Integer id) {
        this.id = id;
        return this;
    }

    public String getSn() {
        return sn;
    }

    public Device setSn(String sn) {
        this.sn = sn;
        return this;
    }

    public String getMac() {
        return mac;
    }

    public Device setMac(String mac) {
        this.mac = mac;
        return this;
    }

    public String getImei() {
        return imei;
    }

    public Device setImei(String imei) {
        this.imei = imei;
        return this;
    }

    public String getIotDeviceId() {
        return iotDeviceId;
    }

    public Device setIotDeviceId(String iotDeviceId) {
        this.iotDeviceId = iotDeviceId;
        return this;
    }

    public String getIotDeviceSecret() {
        return iotDeviceSecret;
    }

    public Device setIotDeviceSecret(String iotDeviceSecret) {
        this.iotDeviceSecret = iotDeviceSecret;
        return this;
    }

    public Date getDtCreate() {
        return dtCreate;
    }

    public Device setDtCreate(Date dtCreate) {
        this.dtCreate = dtCreate;
        return this;
    }

    public Date getDtUpdate() {
        return dtUpdate;
    }

    public Device setDtUpdate(Date dtUpdate) {
        this.dtUpdate = dtUpdate;
        return this;
    }

    @Override
    public String toString() {
        return MoreObjects.toStringHelper(this)
                .add("id", id)
                .add("sn", sn)
                .add("mac", mac)
                .add("imei", imei)
                .add("iotDeviceId", iotDeviceId)
                .add("iotDeviceSecret", "#####")
                .add("dtCreate", dtCreate)
                .add("dtUpdate", dtUpdate)
                .toString();
    }
}
